<template>
  <div class="shouquan">
    <div class="header">
      <img
        src="../../../static/images/lo.jpg"
        alt=""
      >
    </div>
    <div class="text">
      <span>申请获得你的公开信息(昵称、头像等)</span>
    </div>
    <div class="btn">
      <button
        open-type="getUserInfo"
        @getuserinfo="bindGetUserInfo"
        @click="getUserInfo1"
      >微信授权</button>
    </div>
  </div>
</template>

<script>
export default {
	data() {
		return {}
	},
	methods: {
		//微信授权
		bindGetUserInfo(e) {
			if (e.mp.detail.rawData) {
				this.userInfo = e.mp.detail.userInfo
				//手机号验证
				wx.navigateTo({
					url: '/pages/login/main',
				})
			} else {
			}
		},
	},
}
</script>
<style lang="scss" scoped>
.shouquan {
	img {
		width: 100rpx;
		height: 100rpx;
	}
	.header {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 300rpx;
	}
	.text {
        width: 95%;
        height: 35px;
        margin: 0 auto;
        text-align: center;
		span {
			color: #d3d2d2;
			font-size: 32rpx;
			font-family: '楷体';
			letter-spacing: 5rpx;
		}
	}
	.btn {
		line-height: 80rpx;
		width: 100%;
		height: 80rpx;
		button {
			width: 90%;
			margin: auto;
			background: #ffd061;
		}
	}
}
</style>
<style>
page {
	background: #fff;
}
</style>

